﻿using Microsoft.Extensions.Hosting;
using System.Threading;
using System.Threading.Tasks;

namespace Xms.Abp;

class WebHostServiceWorker<TStartup, TModule> : BackgroundService
    where TStartup : XmsAbpStartup<TModule>
    where TModule : XmsAbpStartupModule
{
    protected override async Task ExecuteAsync(CancellationToken stoppingToken)
    {
        while (!stoppingToken.IsCancellationRequested)
        {
            //Console.WriteLine("asdasda");
            await Task.Delay(1000, stoppingToken);
        }
        //await Host.CreateDefaultBuilder()
        //    .ConfigureWebHostDefaults(builder =>
        //    {
        //        builder.UseStartup<TStartup>();
        //    })
        //    .UseAutofac()
        //    .UseSerilog()
        //    .Build()
        //    .RunAsync(stoppingToken);
    }
}

